<!DOCTYPE html>
<html  lang="en"  xmlns:th="http://www.thymeleaf.org">
<base th:href="@{/}">
<head>
	<meta charset="utf-8">
	<meta name="viewport" content="width=device-width, initial-scale=1.0">
	<title>HP-HR - 部门列表</title>
	<meta name="keywords" content="">
	<meta name="description" content="">

	<link rel="shortcut icon" href="favicon.ico">
	<link href=" ../css/bootstrap.min.css?v=3.3.6" rel="stylesheet">
	<link href=" ../css/font-awesome.css?v=4.4.0" rel="stylesheet">

	<link rel="stylesheet" href="../../static/css/bootstrap.min.css?v=3.3.6">
	<!-- Data Tables -->
	<link href=" ../css/plugins/dataTables/dataTables.bootstrap.css" rel="stylesheet">
	<link href=" ../css/animate.css" rel="stylesheet">
	<link href=" ../css/style.css?v=4.1.0" rel="stylesheet">

</head>
<body class="gray-bg">
<div class="wrapper wrapper-content animated fadeInRight">
	<div class="row">
		<div class="col-sm-12">
			<div class="ibox float-e-margins">
				<div class="ibox-title">
					<h5>部门列表</h5>
				</div>
				<div class="ibox-content">
					<div>
						<a href="/department/toAdd" class="btn btn-success">添加部门</a>
					</div>
					<table class="table table-striped table-bordered table-hover dataTables-example">
						<thead>
						<tr>
							<th>序号</th>
							<th>部门号</th>
							<th>部门名称</th>
							<th>电话</th>
							<th>地址</th>
							<th>负责人</th>
							<th width="180px">备注</th>
							<th>管理</th>
						</tr>
						</thead>
						<tbody>

						<tr class="gradeA" th:each="c:${departList}">
							<td th:text="${c.getId()}"></td>
							<td th:text="${c.getDepartmentNumber()}"></td>
							<td th:text="${c.getName()}"></td>
							<td th:text="${c.getTelephone()}"></td>
							<td th:text="${c.getAddress()}"></td>
							<td th:text="${c.getManager()}"></td>
							<td th:text="${c.getNotes()}"></td>
							<td>
								<a th:href="@{'/department/toUpdete/'+${c.getId()}}" class="btn btn-primary">修改</a>
								<a th:href="@{'/department/delDepartment/'+${c.getId()}}" class="btn btn-danger">删除</a>
							</td>
						</tr>
						</tbody>
					</table>
					<div>

							<span style="float: left; padding: 5px">
								当前&nbsp;<span style="color: red;" th:text="${departmentPage.getCurrent()}"></span>&nbsp;/&nbsp;<b th:text="${departmentPage.getSize()}"></b>&nbsp;页&nbsp;&nbsp;
								总共&nbsp;<b th:text="${departmentPage.getTotal()}"></b>&nbsp;条</span>

						<nav aria-label="Page navigation" style="margin: 0 auto; width: 240px">
							<ul class="pagination" style="margin: 0;">
								<li th:if="${departmentPage.hasPrevious()}">
									<a th:href="'/department/listPage?current='+${departmentPage.getCurrent()-1}"
									   aria-label="Previous">
											<span aria-hidden="true" >
													前一页
											</span>
									</a>
								</li>

									<li><a href="##">1</a></li>

								<li th:if="${departmentPage.hasNext()}">
									<a th:href="'/department/listPage?current='+${departmentPage.getCurrent()+1}"
									   aria-label="Next">
											<span aria-hidden="true">
													后一页
											</span>
									</a>
								</li>

							</ul>
						</nav>


					</div>
				</div>
			</div>
		</div>
	</div>
</div>

<!-- 全局js -->
<script src="  ../js/jquery.min.js?v=2.1.4"></script>
<script src="  ../js/bootstrap.min.js?v=3.3.6"></script>
<script src="  ../js/plugins/jeditable/jquery.jeditable.js"></script>

<!-- Data Tables -->
<script src="  ../js/plugins/dataTables/jquery.dataTables.js"></script>
<script src="  ../js/plugins/dataTables/dataTables.bootstrap.js"></script>

<!-- 自定义js -->
<script src="  ../js/content.js?v=1.0.0">

</script>

</body>
</html>
